/*
 * @Author: sxb
 * @Email: sxb@mail.com
 * @Date: 2020-05-26 10:51:54
 * @Descripttion: 客户年度申报管理
 */ 
import request from '@/utils/request'

export function apiGetDeclareYear(data) {
    if(data !== undefined && data !== null){
        data.page = data.page < 0 ? 0 : data.page - 1
    }
    return new Promise((resolve, reject) => {
        request.get('api/declareYear',{params:data}).then(res => {
            resolve(res);
        }).catch(error => {
            reject(error)
        })
    })

}

export function apiPostProvince(data){
    return new Promise((resolve, reject) => {
        request.post('api/baseProvince/add', data).then(res => {

            console.log(res);
            resolve(res);
        }).catch(error => {
            reject(error)
        })
    })
}

export function apiPutProvince(data){
    return new Promise((resolve, reject) => {
        request.put('api/baseProvince/edit', data).then(res => {
            resolve(res);
        }).catch(error => {
            reject(error)
        })
    })
}

export function apiDelProvince(data){
    return new Promise((resolve, reject) => {
        request.delete('api/baseProvince/del', {data:data}).then(res => {
            resolve(res);
        }).catch(error => {
            reject(error)
        })
    })
}